#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<stdbool.h>
bool lemonadeChange(int* bills, int billsSize) {
    int five = 0;
    int ten = 0;
    int sz = sizeof(bills) / sizeof(int);

    for (int i = 0; i < sz; i++)
    {
        if (bills[i] == 5)
        {
            five++;
            continue;
        }
        else if (bills[i] == 10)
        {
            if (five <= 0)
            {
                return false;
            }
            else
            {
                ten++;
                five--;
                continue;
            }
        }
        else if (bills[i] == 20)
        {
            if (ten >= 1 && five >= 1)
            {
                ten--;
                five--;
                continue;
            }
            else if (five >= 3)
            {
                five -= 3;
                continue;
            }
            else
            {
                return false;
            }
        }

    }
    return true;
}
int arr